<template>
    <div>
        <h3>{{ upName }}:</h3>
        <p>{{ blogContent }}</p>
        <button>转发：{{ forward }}</button>
        <button>评论：{{ reply }}</button>
        <button>点赞：{{ like }}</button>
        <button @click="passValue">字体放大</button>
        <hr />
    </div>
</template>

<script setup>
const props = defineProps({
    upName: String, // 字符串
    blogContent: [String, Number], // 传字符串或者数字都可以
    forward: { // 传数字 且必传
        type: Number,
        required: true
    },
    reply: { // 传数字 非必传 默认值为0
        type: Number,
        default: 0
    },
    like: Number
})
const emit = defineEmits(['father-listen'])
function passValue() {
    emit('father-listen', 0.1)
}
</script>